Fix 'on_*=rename-restart' domain configuration option.
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 25 Jan 2008 13:29:07 +0000 (13:29 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 25 Jan 2008 13:29:07 +0000 (13:29 +0000)
commit13b49a376382e709dd620d2f71b720bc40bcb568
tree56441aca13ec1e6ae9ba341357ddaa70146d8067
parent961f9b1fc95c51ed8f076782835d148b040d0005
Fix 'on_*=rename-restart' domain configuration option.

When setting e.g. 'on_crash=rename-restart' option in domain config
and crashing guest OS running in the domain, the new domain is
restarted with same name as renamed domain.

jfehlig4: # xm li
Name                                        ID   Mem VCPUs State Time(s)
Domain-0                                     0   1233   4  r----- 937.9
Domain-e64b12a0-0493-44d7-afde-55c776513426 21   384    1  ---c-  14.3
Domain-e64b12a0-0493-44d7-afde-55c776513426 22   384    1  r-----  7.3

This patch copies the domain info prior to setting new name and uuid
in the crashed domain info and uses the copied domain info to
construct the restarted domain.

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
tools/python/xen/xend/XendDomainInfo.py